package com.situ.pattern.observer1;

public class Reader implements Observer{
    private String name;

    public Reader(String name) {
        this.name = name;
    }

    @Override
    public void update(Subject subject) {
        String content = ((NewsPaper) subject).getContent();
        System.out.println(name + "收到报纸内容：" + content);
    }
}
